package com.gjy.redis.domain;

import lombok.Getter;

/**
 * 业务属性枚举设定
 *
 * @author gjy
 * @version 1.0
 * @since 2025-06-26 21:22:53
 */
@Getter
public enum RedisLockTypeEnum {

    /**
     * 自定义 key 前缀
     */
    ONE("Business1", "Test1"),

    TWO("Business2", "Test2");

    private final String code;
    private final String desc;

    RedisLockTypeEnum(String code, String desc) {
        this.code = code;
        this.desc = desc;
    }

    public String getUniqueKey(String key) {
        return String.format("%s:%s", this.getCode(), key);
    }

}
